package server.domain;

import java.util.Date;

/**
 * Contains the data of an auction.
 * 
 * @author Lukas
 *
 */
public class Auction {
	private final String owner, description;
	private int bid;
	private String highestBidder;
	private final Date expiration;
	
	/**
	 * @param owner The creator of this auction.
	 * @param description The description for the auction.
	 * @param expiration When the auction will expire.
	 */
	public Auction(String owner, String description, Date expiration) {
		this.expiration = expiration;
		this.owner = owner;
		this.description = description;
		bid = 0;
		highestBidder = "none";
	}

	/**
	 * @return the bid
	 */
	public int getBid() {
		return bid;
	}

	/**
	 * @param bid the bid to set
	 */
	public void setBid(int bid) {
		this.bid = bid;
	}

	/**
	 * @return the highestBidder
	 */
	public String getHighestBidder() {
		return highestBidder;
	}

	/**
	 * @param highestBidder the highestBidder to set
	 */
	public void setHighestBidder(String highestBidder) {
		this.highestBidder = highestBidder;
	}

	/**
	 * @return the owner
	 */
	public String getOwner() {
		return owner;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @return the expiration
	 */
	public Date getExpiration() {
		return expiration;
	}
}
